EbsScript mainly helps in an automatic processing of the data stored in Ebsilon. It is not possible to change the topology of the model with EbsScript. This must be done with the graphical Editor.
However, in many cases it is helpful to be able to access the topology functions from EbsScript. For instance, in order to access the values of the connected pipes from a component, one must know, which pipe is connected where. This is enabled by special topology functions (in this case getPipeAtLink), which are described in the chapter on Default value functions.
However, there is a simplified syntax, with which one can access the connections. Nesting is also possible here.
Syntax |
Description |
Example |
compname._i |
Connection at Pin i |
Generator._2.Q Electrical generator power |
compname.__i |
Component at the other end of the connection at Pin i |
Steam generator.__2.ETAI Efficiency |
pipename._in |
Component at the inlet of the pipe |
Electro._in.ETAG Generator efficiency |
pipename._out |
Component at the outlet of the pipe |
L_Main steam._out.ETAI Efficiency HP-Turbine |
comp.__[port number] | access to next component (NOT a line, which is connected via a line to connection "port number". | turbine.__6 returns the component connected to the shaft output of the turbine. |
comp.__[port number]d | Access to next component or line connected by a line to connection "port number" | transmitter.__1d returns the object connected to the input of the value transmitter |
comp.__[port number]p | access to next line (NOT a component), which is connected by a line to connection "port number" | controller.__3p returns the line connected to the controller's "corrected value" output |
pipe._in and ._out | access next component (NOT a pipe) which is connected to the inlet or outlet of the pipe | water._in returns the component connected to the inlet of the water pipe |
pipe._ind and ._outd | access next component or pipe connected to the pipe inlet/outlet | logic._ind returns the object connected to the logic pipe inlet |
pipe._inp and ._outp | access next pipe (NOT a component) associated with the pipe's entry or exit. | scheduled._inp returns the pipe pointed to by the scheduled pipe |
The EbsScript function getLogicObj() can be used to access value crosses, components like 45, 46 etc. and other logic lines docking to a line.
The ‘Short desc’ value of a macro's port can be used as an alias for pipe access. To be usable, the value of the short name must fulfil the requirements for an EbsScript variable name.
Syntax |
Beschreibung |
Datentyp |
Beispiel |
ebsmacrobase._x[Alias]: |
Returns the stream that is connected to the port specified by the alias. |
ebspipe |
::NAMEOFMACRO._xPORT_E (Alias:PORT_E) |
ebsmacrobase .__x[Alias] |
Returns the component that is connected to the other side of the stream and is connected to the port specified by the alias |
ebscomp |
::NAMEOFMACRO.__xPORT_E (Alias:PORT_E) |
ebsmacrobase .__px[Alias]: |
Returns the stream that is connected to the other side of the stream and is connected to the port specified by the alias |
ebspipe |
::NAMEOFMACRO.__pxPORT_E (Alias:PORT_E) |
ebsmacrobase .__dx[Alias]: |
Returns the data object (component or stream) that is connected to the other side of the stream and is connected to the port specified by the alias. |
ebsdata |
::NAMEOFMACRO.__dxPORT_E (Alias:PORT_E) |
[Alias] is to be replaced by the specified short identifier.